package tdd.refactor;

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;

public class TaxiFeeCity {
	final static private Logger LOG = Logger.getLogger("TaxiFeeCity");	
	List<Chargeable> ch;
	TaxiFeeCity() {
		ch =  new ArrayList<Chargeable>();
	}
	
	public void add(Chargeable c) {
		ch.add(c);
	}
	
	public void remove(Chargeable c) {
		ch.remove(c);
	}
		
	public double operate(double miles) {
		FeeMgr feeMgr = new FeeMgr(ch);
//		try {
			return feeMgr.chargeByMiles(miles);
//		} catch  (Exception e) {
//			LOG.info(getClass().getSimpleName() + " " + "input invliad para");			
//			return 0;
//		}
	}


}
